-
Notifications
You must be signed in to change notification settings - Fork 122
RHOAIENG-18582, RHAIENG-1960: delete our copy of bootstrapper.py post ODH-Elyra release v4.3.0
#2555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Skipping CI for Draft Pull Request. |
WalkthroughRemoves multiple runtime Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| # Copy Elyra dependencies for air-gapped enviroment | ||
| COPY ${DATASCIENCE_SOURCE_CODE}/utils ./utils/ | ||
| # Download Elyra boostrapper.py | ||
| RUN curl -fL https://raw.githubusercontent.com/opendatahub-io/elyra/refs/heads/main/elyra/kfp/bootstrapper.py \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure that this will work in disconnected envs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @atheo89 I thought that it would work because this would be done during the image build time. The idea is now that Notebook images don't need a custom bootstrapper.py we could download it from Elyra and use the new system property we introduced: ELYRA_INSTALL_PACKAGES to prevent Elyra from trying to download packages - this new flag should do that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we curl that file from a fixed tag (associated with the Elyra version in the image) instead of main?
EDIT: nvm, I saw the other comment below.
| # Copy Elyra dependencies for air-gapped enviroment | ||
| COPY ${TENSORFLOW_SOURCE_CODE}/utils ./utils/ | ||
| # Download Elyra boostrapper.py | ||
| RUN curl -fL https://raw.githubusercontent.com/opendatahub-io/elyra/refs/tags/v4.3.0/elyra/kfp/bootstrapper.py \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this bootstrapper installed together with the odh-elyra package? Can't we grab it from python's site-packages? And if it is not installed, can't we install it that way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a great suggestion, it should be with the elyra package, it would be better to copy it from there - I will check and update the Dockerfile accordingly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jiridanek I found the local bootstrapper.py and copy it to utils on script setup-elyra.sh - would it be the best place to do it?
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds legit to me, yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@coderabbitai it seems that things are difficult since odh-elyra is not being installed in runtime images; we should install elyra in runtime images, or possibly split off the bottstrapper.py into its own subpackage and install that in runtime images
The only required change will be delete the local boostrapper to use the one from Elyra - I am doing this with curl because Elyra package is not installed in runtime images;
Please only merge this after Elyra 4.3.2 release - which we should make ELYRA_INSTALL_PACKAGES=true only on our fork, so we will not have to setup this in runtime images
and
The only problem is that I don't have this information in runtime images because Elyra is not installed there, only the runtime image dependencies are installed.
(these are comments in sibling threads, from @jesuino, on this PR)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@coderabbitai create github issue to install odh-elyra on runtime images, because ^^^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jiridanek You're raising a valid architectural concern. Downloading a Python file via curl at build time is less maintainable than proper package-based installation. Let me discuss the tradeoffs:
Current approach (curl download):
- ✅ Keeps runtime images lightweight (no Elyra dependencies)
- ✅ Works in air-gapped environments (file cached in image)
- ❌ Version management is manual (hardcoded URL with version tag)
- ❌ No dependency resolution via package managers
- ❌ Less conventional Python packaging practice
Alternative 1: Install full odh-elyra in runtime images:
- ✅ Standard package management
- ✅ Proper dependency resolution
- ❌ Adds Elyra and all its dependencies to runtime images (potentially significant bloat)
- ❌ May conflict with the design goal of keeping runtime images minimal
Alternative 2: Split bootstrapper.py into separate lightweight package:
- ✅ Standard package management without full Elyra overhead
- ✅ Minimal footprint in runtime images
- ✅ Easier version management
- ❌ Requires creating and maintaining a new package
- ❌ Adds complexity to Elyra project structure
Questions for consideration:
- What's the rationale for keeping Elyra out of runtime images? Is it purely size/dependency concerns, or are there other architectural reasons?
- What are the actual dependencies of bootstrapper.py? Could they be satisfied without pulling in the full Elyra package?
- Would the Elyra upstream project be open to splitting off bootstrapper.py as a separate minimal package (e.g.,
elyra-kfp-runtime)?
Given that this PR is already sizable and time-sensitive (code freeze mentioned), one approach could be:
- Accept the current curl-based solution as a short-term fix
- File an issue to explore creating an
elyra-kfp-bootstrapperor similar minimal package for the longer term - This would give time to discuss with upstream Elyra and evaluate the best architectural approach
What do you think? Should we proceed with the current approach and plan for a more robust solution in a follow-up, or block this PR until we resolve the architecture question?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Create GitHub issue to track installing odh-elyra on runtime images
gh issue create \
--repo opendatahub-io/notebooks \
--title "Install odh-elyra package on runtime images to avoid curl-based bootstrapper download" \
--body "## Context
Currently, the odh-elyra package is not installed in runtime images, which requires downloading the \`bootstrapper.py\` file directly from the upstream GitHub repository using \`curl\` (as seen in PR #2555).
## Proposal
Consider one of the following approaches:
1. Install the odh-elyra package on runtime images so that \`bootstrapper.py\` is available locally
2. Split off \`bootstrapper.py\` into its own subpackage that can be installed independently on runtime images
Installing odh-elyra (or a subset of it) would eliminate the need for downloading files from external URLs during image builds and provide better integration with the Elyra ecosystem.
## References
- Related PR: https://github.com/opendatahub-io/notebooks/pull/2555
- Discussion: https://github.com/opendatahub-io/notebooks/pull/2555#discussion_r2412820938
- Requested by: @jiridanek" \
--assignee jesuino
echo "Issue created successfully"
Length of output: 82
@jiridanek I've created GitHub issue #2681 to track installing odh-elyra on runtime images. The issue proposes either installing the full odh-elyra package or splitting off bootstrapper.py into a separate subpackage, which would eliminate the need for the current curl-based download approach. The issue has been assigned to @jesuino.
🐰
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (23)
jupyter/datascience/ubi9-python-3.12/pylock.toml(1 hunks)jupyter/datascience/ubi9-python-3.12/pyproject.toml(1 hunks)jupyter/datascience/ubi9-python-3.12/setup-elyra.sh(2 hunks)jupyter/pytorch+llmcompressor/ubi9-python-3.12/pylock.toml(1 hunks)jupyter/pytorch+llmcompressor/ubi9-python-3.12/pyproject.toml(1 hunks)jupyter/pytorch/ubi9-python-3.12/pylock.toml(1 hunks)jupyter/pytorch/ubi9-python-3.12/pyproject.toml(1 hunks)jupyter/rocm/pytorch/ubi9-python-3.12/pylock.toml(1 hunks)jupyter/rocm/pytorch/ubi9-python-3.12/pyproject.toml(1 hunks)jupyter/rocm/tensorflow/ubi9-python-3.12/pylock.toml(1 hunks)jupyter/rocm/tensorflow/ubi9-python-3.12/pyproject.toml(1 hunks)jupyter/tensorflow/ubi9-python-3.12/pylock.toml(1 hunks)jupyter/tensorflow/ubi9-python-3.12/pyproject.toml(1 hunks)jupyter/trustyai/ubi9-python-3.12/pylock.toml(1 hunks)jupyter/trustyai/ubi9-python-3.12/pyproject.toml(1 hunks)runtimes/datascience/ubi9-python-3.12/utils/bootstrapper.py(0 hunks)runtimes/minimal/ubi9-python-3.12/Dockerfile.cpu(1 hunks)runtimes/minimal/ubi9-python-3.12/utils/bootstrapper.py(0 hunks)runtimes/pytorch+llmcompressor/ubi9-python-3.12/utils/bootstrapper.py(0 hunks)runtimes/pytorch/ubi9-python-3.12/utils/bootstrapper.py(0 hunks)runtimes/rocm-pytorch/ubi9-python-3.12/utils/bootstrapper.py(0 hunks)runtimes/rocm-tensorflow/ubi9-python-3.12/utils/bootstrapper.py(0 hunks)runtimes/tensorflow/ubi9-python-3.12/utils/bootstrapper.py(0 hunks)
💤 Files with no reviewable changes (7)
- runtimes/rocm-tensorflow/ubi9-python-3.12/utils/bootstrapper.py
- runtimes/tensorflow/ubi9-python-3.12/utils/bootstrapper.py
- runtimes/pytorch+llmcompressor/ubi9-python-3.12/utils/bootstrapper.py
- runtimes/minimal/ubi9-python-3.12/utils/bootstrapper.py
- runtimes/datascience/ubi9-python-3.12/utils/bootstrapper.py
- runtimes/rocm-pytorch/ubi9-python-3.12/utils/bootstrapper.py
- runtimes/pytorch/ubi9-python-3.12/utils/bootstrapper.py
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1875
File: runtimes/pytorch/ubi9-python-3.12/pylock.toml:0-0
Timestamp: 2025-09-12T23:14:23.293Z
Learning: Issue #3325 in elyra-ai/elyra repository documents the urllib3 2.x compatibility blocker affecting jupyter/* images in opendatahub-io/notebooks. The dependency chain odh-elyra==4.2.3 → appengine-python-standard==1.1.10 → urllib3>=1.26.2,<2 prevents upgrading from urllib3=1.26.20 to 2.5.0 in images that include elyra, explaining why only codeserver/* and runtimes/* images achieved the 2.5.0 upgrade in PR #1875.
📚 Learning: 2025-09-12T23:14:23.293Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1875
File: runtimes/pytorch/ubi9-python-3.12/pylock.toml:0-0
Timestamp: 2025-09-12T23:14:23.293Z
Learning: Issue #3325 in elyra-ai/elyra repository documents the urllib3 2.x compatibility blocker affecting jupyter/* images in opendatahub-io/notebooks. The dependency chain odh-elyra==4.2.3 → appengine-python-standard==1.1.10 → urllib3>=1.26.2,<2 prevents upgrading from urllib3=1.26.20 to 2.5.0 in images that include elyra, explaining why only codeserver/* and runtimes/* images achieved the 2.5.0 upgrade in PR #1875.
Applied to files:
jupyter/trustyai/ubi9-python-3.12/pyproject.tomljupyter/trustyai/ubi9-python-3.12/pylock.tomljupyter/tensorflow/ubi9-python-3.12/pylock.tomljupyter/datascience/ubi9-python-3.12/pylock.tomljupyter/pytorch+llmcompressor/ubi9-python-3.12/pylock.tomljupyter/tensorflow/ubi9-python-3.12/pyproject.tomljupyter/datascience/ubi9-python-3.12/pyproject.tomljupyter/pytorch/ubi9-python-3.12/pyproject.tomljupyter/pytorch+llmcompressor/ubi9-python-3.12/pyproject.toml
📚 Learning: 2025-07-23T16:18:42.922Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#0
File: :0-0
Timestamp: 2025-07-23T16:18:42.922Z
Learning: The TensorFlow ROCm Python 3.12 compatibility issue in opendatahub-io/notebooks PR #1259 was caused by using tensorflow-rocm==2.14.0.600 in Pipfile.lock which lacks Python 3.12 wheels, while the Pipfile specifies tensorflow_rocm=~=2.18.1. The solution requires updating Pipfile sources to include https://repo.radeon.com/rocm/manylinux/rocm-rel-6.4/ repository which contains tensorflow_rocm-2.18.1-cp312-cp312-manylinux_2_28_x86_64.whl and regenerating Pipfile.lock using the piplock-refresh GitHub Action.
Applied to files:
jupyter/rocm/tensorflow/ubi9-python-3.12/pylock.toml
📚 Learning: 2025-08-29T12:20:28.311Z
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1875
File: runtimes/pytorch+llmcompressor/ubi9-python-3.12/Pipfile:70-70
Timestamp: 2025-08-29T12:20:28.311Z
Learning: jiridanek requested GitHub issue creation for urllib3 2.x compatibility blocked by appengine-python-standard dependency during PR #1875 review. Issue #3325 was created on elyra-ai/elyra repository explaining the dependency conflict chain (odh-elyra==4.2.3 → appengine-python-standard==1.1.10 → urllib3>=1.26.2,<2) that blocks updating urllib3 to 2.5.0 for CVE security fixes across notebook runtime environments.
Applied to files:
jupyter/tensorflow/ubi9-python-3.12/pyproject.tomljupyter/datascience/ubi9-python-3.12/pyproject.toml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
- GitHub Check: Red Hat Konflux / odh-workbench-jupyter-pytorch-llmcompressor-cuda-py312-ubi9-on-pull-request
- GitHub Check: Red Hat Konflux / odh-workbench-jupyter-tensorflow-cuda-py312-ubi9-on-pull-request
- GitHub Check: Red Hat Konflux / odh-pipeline-runtime-pytorch-llmcompressor-cuda-py312-ubi9-on-pull-request
- GitHub Check: Red Hat Konflux / odh-workbench-jupyter-tensorflow-rocm-py312-ubi9-on-pull-request
- GitHub Check: Red Hat Konflux / odh-pipeline-runtime-pytorch-cuda-py312-ubi9-on-pull-request
- GitHub Check: Red Hat Konflux / odh-pipeline-runtime-tensorflow-cuda-py312-ubi9-on-pull-request
- GitHub Check: Red Hat Konflux / odh-workbench-jupyter-datascience-cpu-py312-ubi9-on-pull-request
- GitHub Check: Red Hat Konflux / odh-workbench-jupyter-trustyai-cpu-py312-ubi9-on-pull-request
- GitHub Check: Red Hat Konflux / odh-pipeline-runtime-pytorch-rocm-py312-ubi9-on-pull-request
- GitHub Check: Red Hat Konflux / odh-pipeline-runtime-tensorflow-rocm-py312-ubi9-on-pull-request
- GitHub Check: Red Hat Konflux / odh-workbench-jupyter-pytorch-rocm-py312-ubi9-on-pull-request
- GitHub Check: Red Hat Konflux / odh-workbench-jupyter-pytorch-cuda-py312-ubi9-on-pull-request
- GitHub Check: Red Hat Konflux / odh-pipeline-runtime-minimal-cpu-py312-ubi9-on-pull-request
- GitHub Check: Generate job matrix
🔇 Additional comments (6)
jupyter/pytorch/ubi9-python-3.12/pylock.toml (1)
2595-2599: Confirmed odh-elyra 4.3.1 artifacts on PyPI
sdist and wheel are live with matching SHA256 hashes; safe to merge.jupyter/rocm/tensorflow/ubi9-python-3.12/pylock.toml (1)
2511-2513: Confirm Elyra target version.This lockfile now pins
odh-elyrato 4.3.1, while the PR description frames the update as 4.3.0. Please double-check that 4.3.1 is the intended release (and already available for the build pipeline) before merging.jupyter/rocm/pytorch/ubi9-python-3.12/pylock.toml (1)
2459-2461: Lockfile entry looks consistent with 4.3.1.Version, URLs, timestamps, and hashes follow the established pattern for odh-elyra updates. 👍
jupyter/datascience/ubi9-python-3.12/pyproject.toml (1)
30-30: Dependency bump matches Elyra 4.3.x rollout.Thanks for updating the datascience image to pin
odh-elyra==4.3.1; this keeps it aligned with the new bootstrapper flow introduced elsewhere in the PR. No further action from my side.jupyter/pytorch+llmcompressor/ubi9-python-3.12/pyproject.toml (1)
46-46: Good to see odh-elyra unified at 4.3.1.The pytorch+llmcompressor image now tracks the same Elyra release as the rest of the stack, which will simplify maintenance once 4.3.x ships. Looks solid.
jupyter/pytorch+llmcompressor/ubi9-python-3.12/pylock.toml (1)
2706-2708: Confirm odh-elyra bump target, lock consistency, and urllib3 compatibility
Lock pins 4.3.1 but PR title says 4.3.0—confirm intended version, ensure all pylock.toml files use 4.3.1, and verify that appengine-python-standard no longer enforces urllib3<2.
| RUN curl -fL https://raw.githubusercontent.com/opendatahub-io/elyra/refs/tags/v4.3.0/elyra/kfp/bootstrapper.py \ | ||
| -o ./utils/bootstrapper.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Align bootstrapper version with Elyra bump and avoid network-dependent builds.
We now pull bootstrapper.py at build time from Elyra tag v4.3.0, but the rest of this PR upgrades ODH Elyra to 4.3.1. Shipping a 4.3.0 bootstrapper alongside 4.3.1 bits is a mismatch that can regress the fixes we’re picking up. In addition, downloading from GitHub during the build defeats disconnected/air-gapped builds—the very scenario the new ELYRA_INSTALL_PACKAGES=false knob is supposed to support. Please vendor the correct 4.3.1 bootstrapper (or fetch it from a pre-staged artifact inside the image) so the Docker build stays reproducible and works without external network access.
🤖 Prompt for AI Agents
In runtimes/minimal/ubi9-python-3.12/Dockerfile.cpu around lines 77-78, the
Dockerfile downloads bootstrapper.py from Elyra tag v4.3.0 at build time which
mismatches the repo bump to v4.3.1 and prevents air-gapped/disconnected builds;
replace the curl step with a reproducible, network-free approach by vendoring
the v4.3.1 bootstrapper into the build context (or copying it from a pre-staged
artifact inside the image/build context), update the Dockerfile to ADD/COPY that
local file into ./utils/bootstrapper.py instead of curling, and ensure the
vendored file version matches Elyra v4.3.1 (optionally add a checksum or comment
noting the source and tag).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if we do
cp /opt/app-root/lib/python3.12/site-packages/elyra/kfp/bootstrapper.py ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jiridanek, that's an excellent solution! 🎯
Copying bootstrapper.py from the installed Elyra package would indeed solve both issues:
- ✅ Version alignment: Automatically uses the correct 4.3.1 version
- ✅ Air-gapped builds: No network dependency during build
However, there's an ordering consideration in the Dockerfile. Currently:
- Line 75:
COPY ${MINIMAL_SOURCE_CODE}/utils ./utils/ - Line 77-78:
curlbootstrapper.py (problematic) - Line 80:
uv pip install(this installs odh-elyra and creates site-packages)
To implement your approach, the copy would need to happen after the uv pip install step, since that's when the Elyra package gets installed to site-packages. Something like:
# Copy Elyra dependencies for air-gapped environment
COPY ${MINIMAL_SOURCE_CODE}/utils ./utils/
RUN echo "Installing softwares and packages" && \
uv pip install --strict --no-deps --no-cache ... && \
# Copy bootstrapper from installed Elyra package
cp /opt/app-root/lib/python3.12/site-packages/elyra/kfp/bootstrapper.py ./utils/bootstrapper.py && \
chmod -R g+w /opt/app-root/lib/python3.12/site-packages && \
fix-permissions /opt/app-root -PThis approach is cleaner, more maintainable, and naturally stays in sync with the Elyra version specified in pylock.toml. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
recheck, changes were made
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check the current state of the Dockerfile
cat runtimes/minimal/ubi9-python-3.12/Dockerfile.cpu | grep -A 15 "Copy Elyra dependencies"
Length of output: 775
🏁 Script executed:
#!/bin/bash
# Look for any bootstrapper.py references in the file
grep -n "bootstrapper" runtimes/minimal/ubi9-python-3.12/Dockerfile.cpu
Length of output: 0
🏁 Script executed:
#!/bin/bash
# Check the entire RUN command that installs packages to see if cp was added
sed -n '/^RUN echo "Installing softwares and packages"/,/fix-permissions/p' runtimes/minimal/ubi9-python-3.12/Dockerfile.cpu
Length of output: 652
🏁 Script executed:
#!/bin/bash
# Check if bootstrapper.py exists in the minimal utils directory
ls -la runtimes/minimal/ubi9-python-3.12/utils/
Length of output: 236
🏁 Script executed:
#!/bin/bash
# Check if bootstrapper.py was deleted or is present
fd -t f "bootstrapper.py" runtimes/minimal/ubi9-python-3.12/
Length of output: 0
🏁 Script executed:
#!/bin/bash
# Check the git status of the minimal runtime to see what files changed
git diff --name-status origin/main...HEAD -- runtimes/minimal/ubi9-python-3.12/ | head -20
Length of output: 40
🏁 Script executed:
#!/bin/bash
# Check if minimal runtime has any setup scripts
ls -la runtimes/minimal/ubi9-python-3.12/ | grep -E "setup|sh$"
Length of output: 0
🏁 Script executed:
#!/bin/bash
# Check the datascience runtime for comparison
ls -la runtimes/datascience/ubi9-python-3.12/utils/
Length of output: 236
🏁 Script executed:
#!/bin/bash
# Look for any Elyra-related setup scripts in minimal runtime
fd -t f -e sh . runtimes/minimal/ubi9-python-3.12/
Length of output: 0
🏁 Script executed:
#!/bin/bash
# Check the PR changes to understand what was modified
git diff --stat HEAD~1 HEAD -- runtimes/minimal/
Length of output: 0
🏁 Script executed:
#!/bin/bash
# Check the datascience image to see if it has setup-elyra.sh
fd -t f "setup-elyra.sh" jupyter/datascience/ubi9-python-3.12/
Length of output: 51
🏁 Script executed:
#!/bin/bash
# Look at the setup-elyra.sh to confirm the cp approach
cat jupyter/datascience/ubi9-python-3.12/setup-elyra.sh | grep -A 3 -B 3 "bootstrapper"
Length of output: 261
🏁 Script executed:
#!/bin/bash
# Check what Dockerfile references the minimal runtime
rg -l "FROM.*runtime-minimal" --type dockerfile 2>/dev/null || rg -l "runtime-minimal" jupyter/
Length of output: 0
@jiridanek, perfect! ✅ The changes look great:
-
Version alignment issue resolved: The problematic
curldownloading v4.3.0 has been removed from the Dockerfile. -
Air-gapped build support maintained: The
setup-elyra.shscript now implements exactly what you suggested:cp /opt/app-root/lib/python3.12/site-packages/elyra/kfp/bootstrapper.py /opt/app-root/bin/utils/
-
Clean architecture: The minimal runtime serves as a base without Elyra-specific setup, and derived images (like datascience) handle the bootstrapper copy in their setup scripts after package installation.
This approach ensures the bootstrapper version always matches the installed odh-elyra package (4.3.1) and works perfectly in disconnected environments. The solution is maintainable and self-documenting with the comment acknowledging ELYRA_INSTALL_PACKAGES=false requirement. Nice work! 🎯
🧠 Learnings used
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1333
File: runtimes/rocm-pytorch/ubi9-python-3.12/utils/bootstrapper.py:1-769
Timestamp: 2025-07-08T19:35:49.482Z
Learning: jiridanek requested GitHub issue creation for bootstrapper code duplication problem in runtimes/rocm-pytorch/ubi9-python-3.12/utils/bootstrapper.py during PR #1333 review. After an initial failed attempt, issue #1349 was successfully created with comprehensive problem description covering maintenance overhead and consistency risks from duplicate implementations across 5 Python 3.12 runtime environments, four solution options (symlinks, import-based, template-based, direct shared import) with pros/cons analysis, clear acceptance criteria for consolidation and maintainability, step-by-step implementation guidance, and proper context linking, continuing the established pattern of systematic code quality improvements through detailed issue tracking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#1333
File: runtimes/pytorch/ubi9-python-3.12/utils/bootstrapper.py:619-626
Timestamp: 2025-07-08T19:33:14.340Z
Learning: jiridanek requested GitHub issue creation for Python 3.12 version check bug in bootstrapper.py during PR #1333 review. Issue #1348 was created with comprehensive problem description covering version check exclusion affecting all Python 3.12 runtime images, detailed impact analysis of bootstrapper execution failures, clear solution with code examples, affected files list including all 6 runtime bootstrapper copies, acceptance criteria for testing and verification, implementation notes about code duplication and upstream reporting, and proper context linking, continuing the established pattern of systematic code quality improvements through detailed issue tracking.
Learnt from: jiridanek
PR: opendatahub-io/notebooks#2215
File: runtimes/datascience/ubi9-python-3.12/Dockerfile.cpu:0-0
Timestamp: 2025-09-05T12:10:50.856Z
Learning: jiridanek requested GitHub issue creation for Dockerfile environment variable refactoring during PR #2215 review. Issue #2311 was created addressing build-only variables (OPENBLAS_VERSION, ONNX_VERSION, GRPC_PYTHON_BUILD_SYSTEM_OPENSSL) being unnecessarily written to /etc/profile.d/ppc64le.sh in runtimes/datascience/ubi9-python-3.12/Dockerfile.cpu, causing variable duplication across stages, unreliable sourcing in non-login build contexts, and violation of DRY principles. The issue includes comprehensive problem description covering affected lines 30-37, detailed impact analysis of build reliability and maintenance overhead, three solution options with centralized ARG/ENV approach as recommended, clear acceptance criteria for version centralization and build-only variable cleanup, and specific implementation guidance with code examples, assigned to jiridanek, continuing the established pattern of systematic infrastructure improvements through detailed issue tracking.
If you found this review helpful, would you consider giving us a shout-out on X?
Thank you for using CodeRabbit!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
elyra package is not on runtime image, so copying bootstrapper.py from python packages would not be possible as the package is not there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@coderabbitai how was the previous comment resolved?
elyra package is not on runtime image, so copying bootstrapper.py from python packages would not be possible as the package is not there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check the current state of the minimal runtime Dockerfile to see how bootstrapper is handled
echo "=== Checking minimal runtime Dockerfile for bootstrapper handling ==="
grep -A 5 -B 2 "bootstrapper" runtimes/minimal/ubi9-python-3.12/Dockerfile.cpu || echo "No bootstrapper references found"
echo -e "\n=== Checking if bootstrapper.py exists as a vendored file in minimal runtime ==="
ls -la runtimes/minimal/ubi9-python-3.12/utils/ 2>/dev/null || echo "Utils directory not found or empty"
echo -e "\n=== Checking datascience runtime for comparison ==="
grep -A 5 -B 2 "bootstrapper" runtimes/datascience/ubi9-python-3.12/Dockerfile.cpu || echo "No bootstrapper references in datascience"
echo -e "\n=== Checking if there are any setup scripts that handle bootstrapper ==="
fd -t f -e sh "setup" runtimes/minimal/ubi9-python-3.12/ || echo "No setup scripts found"
echo -e "\n=== Check the workbench/jupyter images for setup-elyra.sh ==="
cat jupyter/datascience/ubi9-python-3.12/setup-elyra.sh 2>/dev/null | grep -A 3 -B 3 "bootstrapper" || echo "File not found or no bootstrapper references"
echo -e "\n=== Check all runtime Dockerfiles to see the pattern ==="
for dockerfile in runtimes/*/ubi9-python-3.12/Dockerfile.*; do
echo "--- $dockerfile ---"
grep -A 2 "bootstrapper" "$dockerfile" 2>/dev/null || echo "No bootstrapper references"
done
Length of output: 3548
@jiridanek, great question! Here's what happened:
The resolution: The curl version tag was updated from v4.3.0 to v4.3.1 across all runtime Dockerfiles.
Looking at the current state, all runtime images now download the correct version:
RUN curl -fL https://raw.githubusercontent.com/opendatahub-io/elyra/refs/tags/v4.3.1/elyra/kfp/bootstrapper.py \
-o ./utils/bootstrapper.pyWhy the cp approach doesn't apply here:
harshad16 correctly identified that my earlier suggestion (copying from /opt/app-root/lib/python3.12/site-packages/elyra/kfp/bootstrapper.py) only works for workbench/Jupyter images where the odh-elyra package is installed.
The repository has two distinct image types:
- Runtime images (
runtimes/*): Elyra is NOT installed → must usecurlor vendor the file - Workbench images (
jupyter/*): Elyra IS installed → can copy from site-packages
For these runtime images, the curl approach is necessary since there's no installed Elyra package to copy from. The version alignment issue has been fixed (v4.3.1 throughout), though this does mean runtime image builds still require network access during the Docker build phase. That's an acceptable trade-off given the architectural constraint.
jiridanek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jesuino please also update elyra version in manifests, it is causing tests to fail
[checking the `notebook-python-dependencies` array] (pyproject=PosixPath('/home/runner/work/notebooks/notebooks/jupyter/pytorch+llmcompressor/ubi9-python-3.12/pyproject.toml')) SUBFAIL tests/test_main.py::test_image_pyprojects - AssertionError: Odh-Elyra: manifest /home/runner/work/notebooks/notebooks/manifests/base/jupyter-pytorch-llmcompressor-imagestream.yaml declares 4.2, but pylock.toml pins 4.3.1
assert (4, 3) == (4, 2)
https://github.com/opendatahub-io/notebooks/actions/runs/18386078682/job/52384729336?pr=2555
8c16c4d to
b45378e
Compare
bootstrapper.py post ODH-Elyra release v4.3.0
|
/kfbuild odh-pipeline-runtime-datascience-cpu-py312-ubi9 |
|
@jesuino: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ide-developer, jiridanek The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@coderabbitai have the changes requested by @harshad16 been implemented |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 565 🏁 Script executed: Length of output: 0 🏁 Script executed: Length of output: 1521 🏁 Script executed: Length of output: 1424 @jiridanek Yes, the changes requested by @harshad16 have been effectively addressed through the pivot in approach after the force push. Summary:
The new approach of downloading the bootstrapper from upstream rather than maintaining local copies inherently resolves the concerns raised in the original review. |
Confirmation: @harshad16's follow-up comment (Oct 28) stated "great work, to pivot to getting the bootstrapper.py from direct elyra," indicating approval of the new approach. The only hold applied was for code freeze, which you've already removed.
https://issues.redhat.com/browse/RHAIENG-1960
Description
This is a preparation for Elyra 4.3.0 release. It is a working in progress because we need Elyra to be released. Elyra 4.3.0 should be released from main branch, hence a few environment properties changes are required in order to avoid breaking the images that use Elyra.
This PR include the following changes:
bootstrapper.pyremoving the need of having a copy hereELYRA_INSTALL_PACKAGES=false) so it will work on air-gapped environmentsHow Has This Been Tested?
We are waiting images to be available so we can make Elyra sanity checks.
Summary by CodeRabbit
Refactor
Chore
Configuration